import { baseUrlApi } from "./utils";
import axios from 'axios'

import { http } from "@/utils/http";

export const service = axios.create({
  baseURL: import.meta.env.VITE_UPLOAD
})


export const uploadUrl = baseUrlApi("/fileupload/upload")
// export const uploadUrl = 'https://iot.wx.cmc-instruments.com.cn/wx/fileupload/upload'



export const uploadVideo = baseUrlApi("/secbackend/alioss/uploadvideo")

// 阿里oss上传图片
export const uploadImg = (data?: object) => {
  return http.request("post", baseUrlApi(`/fileupload/upload`), data);
};

// 阿里oss上传视频
export const uploadvideoapi = (data?: object) => {
  return http.request("post", baseUrlApi(`/secbackend/alioss/uploadvideo`), data);
};


